1. Field of the Invention
The present invention relates to a power management system for a microcontroller that provides decentralized power management of the microcontroller subsystems while providing a modular architecture that can be used for microcontrollers having different numbers of subsystems and more particularly to a modular power management architecture for a microcontroller which includes a power management state machine for controlling the power modes of the various microcontroller subsystems as well as a programmable peripheral interface for each of the subsystems which allows the response of the various subsystems to the various power modes to be preconfigured, thereby providing optimal power management of the subsystems.
2. Description of the Related Art
Various microcontrollers are used in numerous portable battery powered devices, such as portable personal computers and cellular phones. An important concern in any portable battery powered device is extending the amount of time the device can be used before the battery requires recharging. It is known to provide power management of the various subsystems within such portable devices in order to conserve battery power. Computer systems, for example, as disclosed in U.S. Pat. No. 4,980,836, utilize centralized power management control of various peripheral devices, such as the floppy disk drive and hard disk drive in order to conserve battery power. More particularly, in the system disclosed in the ""836 patent, accesses to the various peripheral devices, such as the floppy disk drive and the hard disk drive are monitored. If the peripheral devices have not been accessed for a predetermined amount of time, the computer system including the peripherals are placed in a low power state by way the centralized power management control logic. In such a low power state, the system clock frequency may be either stopped or reduced in order to reduce the power consumption of the device. By stopping the system clock, the power consumption is significantly reduced since CMOS devices, typically used in such applications, utilize extremely low power at zero frequency. Other known computer power management systems are disclosed in U.S. Pat. Nos. 4,611,289; 4,041,964; 5,218,704; 5,396,635; and 5,504,907.
The drawbacks of centralized power management control for peripheral devices are recognized by peripheral device manufacturers. In particular, it is recognized that the power management of a particular peripheral for a computer system may be best optimized at the peripheral device itself. Thus, various peripheral manufacturers have developed decentralized power management systems for various peripheral devices in order to optimize battery power conservation. For example, U.S. Pat. No. 4,151,611 discloses a power management system for memory systems. U.S. Pat. No. 4,951,309 discloses a power management system for a modem. U.S. Pat. No. 5,345,347 discloses a power management system for a disk drive. U.S. Pat. Nos. 5,546,590 and 5,606,704 disclose power management system for PC MCIA cards.
As mentioned above, microcontrollers are used in various applications for portable devices, such as cellular phones and automotive systems. In all such applications, there is an ever increasing trend to reduce the size of the device. For example, in newer cellular phone systems, unlike the xe2x80x9cbagxe2x80x9d phones in which the battery is carried in a bag separate from the phone, the newer portable cellular telephone include an integral battery and are becoming smaller and smaller. As such, reduction of the size of the cellular phone typically results in a reduction of the battery size. In general, for a given battery chemistry, for example, nickel cadmium or nickel metal hydride, reducing the size of the battery results in a reduced battery capacity. As such, reduced cellular phone size and increased battery capacity have become competing design tradeoffs in such devices. In order to optimize the tradeoff, power management techniques, utilized on a system level, for example, for computer systems, as discussed above, have been implemented on a microcontroller level in order to minimize battery power consumption. In general, power management techniques at the microcontroller level are known to utilize centralized control to control the power to the central processing unit (CPU) by reducing the speed or stopping the system clock.
There are several disadvantages in utilizing such centralized control at the microcontroller level. First, such centralized systems do not optimize the power usage of the various subsystems of the microcontroller. In general, the microcontroller subsystems are treated equally with the CPU from a power management standpoint and are thus not optimized. Secondly, the architecture of the power management system in known microcontrollers varies as a function of the number of subsystems included in the microcontroller for a given microcontroller family. For example, lower cost microcontrollers are normally provided without analog and digital converters (ADC) and corresponding ADC ports requiring one power management architecture, while higher level microcontrollers within the same family may include an ADC as well as other subsystems which require a different power management architecture. Thus, for a given family of microcontrollers, multiple power management architectures may be required, which increases the cost and complexity of the microcontrollers.
It is an object of the present invention to solve various problems in the prior art.
It is yet a further object of the present invention to provide a power management system for a microcontroller which enables the microcontroller subsystems to be independently controlled.
It is yet a further object of the present invention to provide a modular architecture for a power management system for a microcontroller which enables the power management of the microcontroller subsystems to be controlled independently of the central processing unit (CPU).
Briefly, the present invention relates to a power management architecture for a microcontroller. The power management architecture includes a power management state machine for controlling the power mode of the central processing unit (CPU) and each of the subsystems within the microcontroller. The power management state machine includes a software configurable register (SFR) to enable the state machine to be configured for device and application specific applications. Each of the microcontroller subsystems is connected to the system by way of a flexible peripheral interface (FPI)(the system bus). The FPI is a 32 bit de-multiplexed, pipelined bus. Each FPI device includes a software configuration register, special function register (SFR) which can be configured by an operating system or application program. The SFR for the various FPI devices enables the response to each of the power modes of each microcontroller subsystem to be pre-configured; thus enabling each subsystem to be independently controlled by the power management state machine in order to optimize the power management of the various subsystems. Each of the FPI interfaces as well as the power management state SFR are connected to an FPI bus which interconnects the FPI interfaces with the central processing unit (CPU) and power management state machine SFR. The FPI bus enables reads and writes of the power management state machine SFR and peripheral interface SFRs. Such a configuration allows subsystems to be added or deleted without changing the basic architecture of the power management system, thus forming a modular power management architecture which reduces the cost and complexity of the microcontrollers.